#pragma once

#include <Network/TcpPacketDispatcher.h>
#include <Network/TcpPacket.h>
#include <Network/TcpConnection.h>

class ClientPacketHandler : public TcpConnectionEventHandler
{
protected:
	ClientPacketHandler(void);
	virtual ~ClientPacketHandler(void);

private:
	virtual void OnConnected(TcpConnection*, int error);
	virtual void OnReceived(TcpConnection*, TcpPacket* packet, int error);
	virtual void OnSent(TcpConnection*, int error);
	virtual void OnClosed(TcpConnection*, int error);

protected:
	virtual void OnStarted() = 0;
	virtual void OnStopped() = 0;

	virtual void OnLogin(bool result) = 0;
};

